Electronic sensors for determining the direction of an external magnetic field are well known in the art in a variety of contexts. One particularly important use of such sensors is to determine the orientation of the sensor with respect to the magnetic field of the earth. When such a sensor is employed in this way it is often called an electronic compass.
Electronic compasses have numerous advantages over conventional compasses utilizing a piece of magnetized metal to indicate direction. One such advantage is that a typical electronic compass may be much smaller in size than a typical magnetized metal compass. A second advantage is that an electronic compass provides an electrical output allowing a simple interface with other electronic circuitry such as an electronic navigation system. A third advantage is that an electronic compass is not affected by acceleration or deceleration of a vehicle in which the compass is carried.
Typical prior art electronic compasses use at least two magnetic field sensors to determine the user's orientation with respect to the earth's magnetic field. The reason for this may be seen by reference to FIG. 1. In FIG. 1 H.sub.H represents the horizontal component of the earth's magnetic field, which, by definition, points in the direction of magnetic north. If the user is traveling in the direction indicated by H.sub..parallel. the angle .theta. would be the compass bearing indicating the direction of travel. If H.sub..parallel. indicates the component of H.sub.H in the desired direction a function A[H.sub..parallel. ] may be defined such that EQU A[H.sub..parallel. ]=.vertline.H.sub.H .vertline. cos .theta.(1)
Those skilled in the art will readily perceive that A[H.sub..parallel. ] corresponds to the magnitude of H.sub..parallel. if 0.degree..ltoreq..theta..ltoreq.90.degree. or 270.degree..ltoreq..theta..ltoreq.360.degree. and the negative of the magnitude of H.sub..parallel. if 90.degree..ltoreq..theta..ltoreq.270.degree.. Therefore, ##EQU1## A knowledge of the magnitude of H.sub..parallel. alone will not provide sufficient information to allow calculation of the angle .theta., however. This is because the magnitude of H.sub.H varies with latitude. This variation of H.sub.H may be seen by representing the earth's magnetic field as that produced by a magnetic dipole with dipole moment M located at the center of the earth. In this approximation EQU .vertline.H.sub.H .vertline.=-.vertline.M/r.sup.3 .vertline. sin (90.degree.-.gamma.) (3)
where r is the radius of the earth and .gamma. is the latitude. Clearly, therefore, the magnitude of H.sub.H, and hence that of H.sub..parallel., will vary from one latitude to another even when .theta. remains constant.
One method used in the prior art to overcome this problem is to use two magnetic field sensors. One sensor measures A[H.sub..parallel. ] as defined above while the second measures A[H.sub..perp. ], where H.sub..perp. is the component of H.sub.H perpendicular to H.sub..parallel.. Because the sensor measuring A[H.sub..perp. ] is oriented perpendicularly to the one measuring A[H.sub..parallel. ] the following relation arises ##EQU2##
Using equations (1) and (4) and defining the tan.sup.-1 function in the range 0.degree..ltoreq..theta.&lt;180.degree. the angle .theta. can be calculated as shown in equation (5) below if .theta. falls within the range over which the tan.sup.-1 function is defined. ##EQU3##
If .theta. does not fall in the range given above it may be calculated as ##EQU4## A determination of whether to use equation (5) or (5') may be made by examining A[H.sub..parallel. ] and A[H.sub..perp. ]. If A[H.sub..perp. ]&gt;0 or if A[H.sub..perp. ]=0 and A[H.sub..parallel. ]&gt;0, 0.degree..ltoreq..theta.&lt;180.degree. and equation (5) is used. Otherwise equation (5') is used.
A second method of the prior art uses three sensors to measure magnetic field components in three directions, each oriented at an angle of 120.degree. from the other two. The magnitude of any two of these components may then be used to calculate the value of the angle .theta..
A problem inherent in electronic compasses utilizing multiple sensors is that such systems depend on those sensors having substantially identical operating characteristics if the output of the sensors is to be used directly to evaluate equation (5) without substantial additional processing to correct for differences in such operating characteristics. Typical semiconductor fabrication processes do not produce such uniform sensors, however. A variation in operating characteristics of up to 5% is common among magnetic field sensors produced on a single semiconductor wafer.